Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control Flow Block Constraints #1476

Merged
merged 10 commits into from
May 30, 2024
Merged

Control Flow Block Constraints #1476

merged 10 commits into from
May 30, 2024

Conversation

phschaad
Copy link
Collaborator

@phschaad phschaad commented Dec 11, 2023

This PR implements pre- and post-conditions on control flow blocks, as well as invariants. This is a feature that was discussed in the last DaCe Workshop of 2023 but has not been implemented yet since then.

These invariants serve as helpers in analysis of the SDFG and may in the future be used to add runtime checks / assertions (optionally). A pass can be used to attempt automatic derivation of such constraints, or they can be manually set as properties.

This PR adds the scaffolding for this and for now implements a single auto-constraint-derivation criterium, which states that parameters used to determine data container sizes are always >= 0 and optionally assumed to always be <= MAX_N, where MAX_N is a configurable analysis pass parameter.

@phschaad phschaad marked this pull request as ready for review December 11, 2023 19:20
@phschaad phschaad added the enhancement New feature or request label Dec 12, 2023
@phschaad phschaad requested a review from tbennun May 16, 2024 12:29
@phschaad phschaad added this pull request to the merge queue May 30, 2024
Merged via the queue into master with commit 0020c6c May 30, 2024
10 checks passed
@phschaad phschaad deleted the cfg_block_conditions branch May 30, 2024 16:36
alexnick83 pushed a commit that referenced this pull request Jul 13, 2024
This PR implements pre- and post-conditions on control flow blocks, as
well as invariants. This is a feature that was discussed in the last
DaCe Workshop of 2023 but has not been implemented yet since then.

These invariants serve as helpers in analysis of the SDFG and may in the
future be used to add runtime checks / assertions (optionally). A pass
can be used to attempt automatic derivation of such constraints, or they
can be manually set as properties.

This PR adds the scaffolding for this and for now implements a single
auto-constraint-derivation criterium, which states that parameters used
to determine data container sizes are always `>= 0` and optionally
assumed to always be `<= MAX_N`, where `MAX_N` is a configurable
analysis pass parameter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants